module.exports = app => {
  const {
    STRING,
    INTEGER
  } = app.Sequelize; //获取数据类型
  const Material = app.model.define('material', {
    id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true
    },
    name: {
      type: STRING,
      allowNull: false
    },
    number: {
      type: STRING,
      allowNull: false
    },
    cook_id: {
      type: INTEGER,
      allowNull: false
    }
  }, {
    freezeTableName: true,
    timestamps: false,
    createdAt: 'create_time',
    updatedAt: 'updated_time',
    deletedAt: false,
    paranoid: false
  })
  return Material
}